tests: Respect TEST_TMPDIR for temporary directories
Several C tests hardcoded /var/tmp as the base path for temporary
working directories, ignoring the TEST_TMPDIR environment variable
used by the shell test suite.
This caused tests to create their ostree repos on the overlayfs
filesystem even when TEST_TMPDIR points to a real filesystem,
bypassing the intended workaround for overlayfs's inaccurate
free-space reporting. As a result, ostree's min-free-space-percent
check (default 3%) would fire when writing content objects, making
tests fail in containerized environments where the rootfs is overlayfs.
Fix by reading TEST_TMPDIR at runtime and falling back to /var/tmp
when it is not set, consistent with how the shell test suite handles
this. Affected tests:
- tests/test-libarchive-import.c
- tests/test-basic-c.c
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>